package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"goods/api/internal/config"
	"goods/goodsrpc/goodsrpcclient"
)

type ServiceContext struct {
	Config   config.Config
	GoodsRpc goodsrpcclient.Goodsrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:   c,
		GoodsRpc: goodsrpcclient.NewGoodsrpc(zrpc.MustNewClient(c.GoodsRpc)),
	}
}
